-- GENERATED SPELL FOR [Stratholme Resident] --


function spell0_28341(pUnit, Event) --@Arcane Wave,n/a--
pUnit:FullCastSpellOnTarget(52660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28341', 2500, 1)
end

function spell1_28341(pUnit, Event) --@Arcane Wave,n/a--
pUnit:FullCastSpellOnTarget(58817,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28341', 2000, 1)
end

function spell2_28341(pUnit, Event) --@Temporal Vortex,n/a--
pUnit:FullCastSpellOnTarget(52657,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28341', 5000, 1)
end

function spell3_28341(pUnit, Event) --@Temporal Vortex,n/a--
pUnit:FullCastSpellOnTarget(58816,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28341', 5000, 1)
end

function Sorts_28341(pUnit, Event)
local choix_sorts_28341 = math.random(0, 3)
if choix_sorts_28341 == 0 then
pUnit:RegisterEvent('spell0_28341', 1, 1)
end
if choix_sorts_28341 == 1 then
pUnit:RegisterEvent('spell1_28341', 1, 1)
end
if choix_sorts_28341 == 2 then
pUnit:RegisterEvent('spell2_28341', 1, 1)
end
if choix_sorts_28341 == 3 then
pUnit:RegisterEvent('spell3_28341', 1, 1)
end
end

function mob28341_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28341', math.random(1500, 3000), 1)
end

function mob28341_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28341_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28341_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28341, 1, 'mob28341_Action')
RegisterUnitEvent(28341, 2, 'mob28341_Leave')
RegisterUnitEvent(28341, 3, 'mob28341_Kill')
RegisterUnitEvent(28341, 4, 'mob28341_Die')
